#pragma once

#ifdef BY_PLATFORM_WINDOWS
#if BY_DYNAMIC_LINK
	#ifdef BY_BUILD_DLL
		#define BABY_API  _declspec(dllexport)
	#else
		#define BABY_API  _declspec(dllimport)
	#endif // BY_BUILD_DLL
#else
	#define BABY_API
#endif // BY_DYNAMIC_LINK
#else
	#error Baby only support Windows!
#endif // BY_PLATFORM_WINDOWS

#ifdef BY_DEBUG
#define BY_ENABLE_ASSERTS
#endif

#ifdef BY_ENABLE_ASSERTS
	#define BY_ASSERT(x, ...) {if(!(x)) {BY_ERROR("Assertion Failed:{0}", __VA_ARGS__); __debugbreak(); } }
	#define BY_CORE_ASSERT(x, ...) {if(!(x)) {BY_ERROR("Assertion Failed:{0}", __VA_ARGS__); __debugbreak(); } }
#else
	#define BY_ASSERT(x, ...)
	#define BY_CORE_ASSERT(x, ...)
#endif // BY_ENABLE_ASSERTS

#define BIT(x) (1 << x)

#define BIND_EVENT_FN(fn) std::bind(&fn, this, std::placeholders::_1)
